﻿<%@ Page Title="<%$Resources:Language,CmsNewsEditTitle %>" Language="C#" MasterPageFile="~/cms.master"
    AutoEventWireup="true" CodeFile="NewsEdit.aspx.cs" Inherits="NewsEdit" %>

<%@ Register Src="~/controls/ctrlWait.ascx" TagName="ctrlWait" TagPrefix="ctrl" %>
<%@ Register Src="~/controls/ctrlShowInfo.ascx" TagName="ctrlShowInfo" TagPrefix="ctrl" %>
<%@ Register Assembly="Winthusiasm.HtmlEditor" Namespace="Winthusiasm.HtmlEditor"
    TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">

    <script language="javascript" type="text/javascript" src="../Javascript/Common.js"></script>

    <h2>
        <%=Resources.Language.News%></h2>
    <ctrl:ctrlWait ID="ctrlWait" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <ctrl:ctrlShowInfo ID="CtrlShowInfo" runat="server" />
            <div class="vSeparate">
                <span class="peBoxLeft"></span><span class="peBoxRight">
                    <asp:Button ID="btnNewTop" runat="server" Text="<%$REsources:Language,New %>" OnClick="New_Click"
                        CausesValidation="false" />
                    <asp:Button ID="btnSaveTop" runat="server" Text="<%$REsources:Language,Save %>" OnClick="Save_Click" />
                    <asp:Button ID="btnDeleteTop" runat="server" Text="<%$REsources:Language,DeleteUpper %>"
                        OnClick="Delete_Click" CausesValidation="false" Enabled="false" />
                </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft">
                    <%=Resources.Language.News%>: </span><span class="peBoxRight">
                        <asp:DropDownList ID="ddlNews" runat="server" DataTextField="Title" CssClass="DropDownWide"
                            DataValueField="NewsID" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="ddlNews_SelectedIndexChanged">
                        </asp:DropDownList>
                    </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft">
                    <%=Resources.Language.Lang %>: </span><span class="peBoxRight">
                        <asp:DropDownList ID="ddlLanguage" runat="server" DataTextField="Name" DataValueField="LanguageID"
                            AutoPostBack="true" OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged"
                            CssClass="DropDownShort">
                        </asp:DropDownList>
                    </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft">
                    <%=Resources.Language.Title %>: </span><span class="peBoxRight">
                        <asp:TextBox ID="tbTitle" runat="server" CssClass="TextInputWide"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ControlToValidate="tbTitle"
                            ErrorMessage="*"></asp:RequiredFieldValidator>
                    </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft">
                    <%=Resources.Language.Description %>: </span><span class="peBoxRight">
                        <asp:TextBox ID="tbDescription" runat="server" CssClass="TextInputWide" Height="100px"
                            TextMode="MultiLine"></asp:TextBox>
                    </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft">
                    <%=Resources.Language.Content %>: </span><span class="peBoxRight">
                        <cc2:HtmlEditor ID="heContent" runat="server" Width="500px" Height="300px" />
                    </span>
            </div>
            <div class="vSeparate">
                <span class="peBoxLeft"></span><span class="peBoxRight">
                    <asp:Button ID="btnNewBottom" runat="server" Text="<%$REsources:Language,New %>"
                        OnClick="New_Click" CausesValidation="false" OnClientClick="ScrollTop();" />
                    <asp:Button ID="btnSaveBottom" runat="server" Text="<%$REsources:Language,Save %>"
                        OnClick="Save_Click" OnClientClick="ScrollTop();" />
                    <asp:Button ID="btnDeleteBottom" runat="server" Text="<%$REsources:Language,DeleteUpper %>"
                        OnClick="Delete_Click" CausesValidation="false" Enabled="false" OnClientClick="ScrollTop();" />
                </span>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
